<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
</head>
<body>

<div id="app">
    <ol>
        <todo-item v-for="item in sites" v-bind:todo="item"></todo-item>
    </ol>
</div>

<script>

    // 注册
    Vue.component('todo-item', {
        props: ['todo'],
        template: '<li>{{ todo.text }}</li>'
    });

    // 创建根实例
    new Vue({
        el: '#app',
        data: {
            sites: [
                {text: 'Runoob'},
                {text: 'Google'},
                {text: 'Taobao'}
            ]
        }
    });
</script>


</body>
</html>